home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 25
/
Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso
/
Aminet
/
dev
/
amos
/
AMOS0398.lzh
/
AMOSLIST
/
000074_amos-request@svcs1.digex.net_Sat Mar 7 01:50:52 1998.msg
< prev
next >
Wrap
Text File
|
1998-04-01
|
15KB
|
453 lines
>From amos-request@svcs1.digex.net Sat Mar 7 01:50:51 1998
Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
by pony-1.mail.digex.net (8.8.8/8.8.8) with ESMTP id BAA01782
for <mcox@access.digex.net>; Sat, 7 Mar 1998 01:50:51 -0500 (EST)
Received: (from daemon@localhost)
by svcs1.digex.net (8.8.5/8.8.5) id AAA22034
for amos-out; Sat, 7 Mar 1998 00:14:22 -0500 (EST)
Received: from pony-2.mail.digex.net (pony-2.mail.digex.net [204.91.241.6])
by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id AAA22031
for <amos-list@svcs1.digex.net>; Sat, 7 Mar 1998 00:14:21 -0500 (EST)
Received: from mail1.desupernet.net (mail.desupernet.net [204.249.184.22])
by pony-2.mail.digex.net (8.8.8/8.8.8) with SMTP id AAA27339
for <amos-list@access.digex.net>; Sat, 7 Mar 1998 00:14:20 -0500 (EST)
Received: (qmail 9011 invoked from network); 7 Mar 1998 05:14:15 -0000
Received: from unknown (HELO mushypd) (mushy-pd@208.157.100.171)
by 204.249.184.22 with SMTP; 7 Mar 1998 05:14:15 -0000
From: Andy Kellett <mushypd@redrose.net>
Reply-To: Andy Kellett <mushypd@redrose.net>
To: amos-list@access.digex.net
Date: Sat, 07 Mar 1998 00:12:51 -0400
Message-ID: <yam7370.2582.3550672@mail.redrose.net>
X-Mailer: YAM 2.0.0 Preview [020] - Amiga Mailer by Marcel Beck - http://www.yam.ch
Organization: Mushroom PD - AMOS PD Library
Subject: Using AMOSPro to send Emails
MIME-Version: 1.0
Content-type: multipart/mixed; boundary="BOUNDARY.3550672.1"
Status: O
X-Status:
Warning: This is a message in MIME format. Your mail reader does not
support MIME. Some parts of this message will be readable as plain text.
To see the rest, you will need to upgrade your mail reader.
--BOUNDARY.3550672.1
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Since working with the GUI Extension, and also on my Mailinglist software=
,
ive been asked by several AMOS users how it is possible for the betateste=
rs
to send their information directly to me via the net (without saving it t=
o
YAM/UUSPOOL first). Included in this mail, is the source code for placing=
such a form in your own creations. Attached to this mail is a file named
Mailform.WIN which you should simply load as a window in your GadToolsBox=
file, and save accordingly. You will also need to change the Gui Open/Clo=
se
commands to react correctly with it. This program should work with Gui V1=
=2E62
although I haven't tried.
Feel free to use this program in your own productions, just give me and t=
he
PD library a mention in the documentation/in the program. If you have any=
comments/questions about this routine, feel free to email me or the list.=
' Simple Mailform program. Written using the GUI Extension (V1.70) =
' Written by Andy "Mushroom" Kellett C Mushroom PD 1998. =
'
' This program is freely usable by anybody.
' =
' Note, that you WILL have to change the GUI Open/Close commands to respo=
nd
' to that of the correct one in your program. You will also need to =
' customize the program + SMTP servers to your own needs.
'
Dim LV$(200)
Global LV$()
Procedure EMAILREQUEST
' This part of the program asks for the user's information so that the=
y
can
' be contacted in the future about any new releases/updates or other i=
nfo
' which can be sent to them. It also gives me an idea of just who is
using =
' the program, so you can determine which part of the world wishes to =
use
it =
' more.
=
Proc COUNTRYS : Rem Read in the list of countrys to the large array
=
Gui Open 2,10,20 : Rem Open up the GUI Screen =
Gui Set 2,4,1,Array(LV$(0)) : Gui Set 2,4,0,0 : Rem Setup array and Fi=
rst
selection
=
LP1:
A=3DGui Wait
=
If A=3D0 : Rem SEND INFO button hit =
Goto _PROCESS
End If =
=
Goto LP1
=
_PROCESS:
' Check the status of the gadgets to make sure no abnormalities will b=
e
sent =
' to my email box. =
=
NAME$=3DGui Read$(2,1) : EM$=3DGui Read$(2,2) : WWW$=3DGui Read$(2,3) =
: CC$=3DGui
Read$(2,4)
=
' First check for blank headers
If NAME$=3D"" or EM$=3D"" : Rem Blank Entry's
A=3DGui Req("Mail Error...","Blank Fields Remain in Entry","OK") : =
Goto
LP1
End If =
=
' Now check that email contains the correct information
I=3DInstr(EM$,"@")
If I=3D0
A=3DGui Req("Mail Error...","Email address is incorrect. Please
check.","OK") : Goto LP1
End If =
=
' I guess its safe to say that the email is pretty good to go once it
gets here =
' As well as the information given in the form, the program will send =
me =
' the following pieces of information regarding the user:
'
' There hostname ($HOSTNAME) =
' There real name ($REALNAME)
'
' This just gives me a brief idea of what will be going on with the
program
=
LP2:
SERV$=3D"mail.redrose.net" : Rem Change to your Mailserver
HOST$=3D"redrose.net" : Rem Change to your Host
_TO$=3D"mushypd@redrose.net" : Rem Change to your Email address =
FROM$=3DEM$
EC$=3DChr$(13)+Chr$(10)
=
If Not Exist("Ram:Env/HOSTNAME")
LP3:
TEX$=3D"It would appear that your Amiga is not"+Chr$(10)
TEX$=3DTEX$+"connected to the internet. Please connect"+Chr$(10)
TEX$=3DTEX$+"your machine to the internet, and hit the"+Chr$(10)
TEX$=3DTEX$+"RETRY button to continue. If it is connected"+Chr$(10)=
TEX$=3DTEX$+"then please ensure the connection is OK."
=
A=3DGui Req("Connection Error...",TEX$,"Retry") : Goto LP2
End If =
=
Trap A=3DTcp Open(1,SERV$+"/25") : E=3DErrtrap : Tcp Limit 500
=
' IMPORTANT NOTE =
'
' Some SMTP mailservers do not use Port 21 (SMTP) but port 25. If your=
=
' program doesnt work on the one port, then try the other (21). One wa=
y
' to test, is to connect to it with a Telnet program, as you should ge=
t
' a "ESMTP Server Ready" message if you connect correctly. =
=
If A=3DFalse or E>0
A=3DGui Req("Error.","Couldnt resolve SMTP Host","OK") : Goto LP3
End If =
=
Open Out 2,"Sys:MailResults"
=
A=3DTcp Put$(1,"HELO "+HOST$+EC$)
A=3DTcp Put$(1,"MAIL FROM: <"+FROM$+">"+EC$)
A=3DTcp Put$(1,"RCPT TO: <"+_TO$+">"+EC$)
A=3DTcp Put$(1,"DATA"+EC$)
A=3DTcp Put$(1,"To: <"+_TO$+">"+EC$) : =
A=3DTcp Put$(1,"From: My Program <"+FROM$+">"+EC$)
A=3DTcp Put$(1,"Subject: Internal Program Email"+EC$)
A=3DTcp Put$(1,"X-Comment: AMOSPro Test"+EC$)
A=3DTcp Put$(1,"X-Mailer: AMOSPro"+EC$+EC$)
=
' Now, another list of stuff to send. Ive put into data statements to
' limit the amount of repetitive code used.
=
TEX$=3D"hostname" : V=3D1 : Gosub _GETFILE
Inc V : TEX$=3D"realname" : Gosub _GETFILE
=
D1:
Data "Name: "+NAME$,"Email Address: "+EM$,"WWW: "+WWW$,"Country: "+CC$=
,"
"
Data "This Mailform was sent from My Program. The version of the"
Data "program reported itself as being:"," ",VER$," "
Data "This particular version of the program is unregistered, and was
released"
Data "into the public on March 5, 1998."," "
Data "Hostname: "+HN$,"Real Name: "+RN$
Data "*"
=
Restore D1
Repeat =
Read G$ : Rem Read in mail input =
If G$<>"*"
A=3DTcp Put$(1,G$+EC$) : Print #2,G$+Chr$(10);
End If =
Until G$=3D"*"
=
A=3DTcp Put$(1,"."+EC$)
A=3DTcp Put$(1,"QUIT"+EC$)
=
Gui Pause 50
Tcp Close 1 : Close 2
=
TEX$=3D"Your information has been emailed directly"+Chr$(10)
TEX$=3DTEX$+"to the author, and you will be placed on the"+Chr$(10)
TEX$=3DTEX$+"list of betatesters, and will also receive info"+Chr$(10)=
TEX$=3DTEX$+"on new updates etc. A copy of the information"+Chr$(10)
TEX$=3DTEX$+"sent can be found in SYS:MailResults"+Chr$(10)+Chr$(10)
TEX$=3DTEX$+"Thank-you"
=
A=3DGui Req("Mail Notification",TEX$,"No Problem!")
A=3DGui Close(2) : Gui On 1
Pop Proc
=
End =
=
_GETFILE:
P$=3D""
If Exist("RAM:ENV/"+TEX$) : Rem Enviroment File
Open In 1,"Ram:Env/"+TEX$ : P$=3DInput$(1,Lof(1)) : Close 1
End If =
=
If V=3D1 : HN$=3DP$ : End If =
If V=3D2 : RN$=3DP$ : End If =
Return =
=
_ERROR:
TEX$=3D"An error has occured. Please check the"+Chr$(10)+"connection y=
ou
have to the internet"
TEX$=3DTEX$+Chr$(10)+"and hit the RETRY button. If you want
to"+Chr$(10)+"abort this operation for the moment"
TEX$=3DTEX$+Chr$(10)+"then hit the CANCEL button."
=
A=3DGui Req("Processing Error...",TEX$,"Retry|Cancel")
=
' 1 =3D Retry
' 0 =3D Cancel =
=
If A=3D1 : Goto LP2 : End If =
If A=3D0 : Trap Kill "MLM:Data/MailResults" : A=3DGui Close(2) : Gui O=
n 1 :
Pop Proc : End If =
End Proc
Procedure COUNTRYS
CT:
Data "Afghanistan","Albania","Algeria","Andorra","Angola","Antigua and=
Barbuda","Argentina","Armenia","Australia","Austria","Azerbaijan"
Data "Bahamas,
The","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Beni=
n","Bhutan","Bolivia","Bosnia
and Herzegovina"
Data "Botswana","Brazil","Brunei","Bulgaria","Burkina
Faso","Burma","Burundi","Cambodia","Cameroon","Canada","Cape Verde"
Data "Central African
Republic","Chad","Chile","China","Colombia","Comoros","Congo
(Brazzaville)","Congo (Kinshasa)","Costa Rica","Cote d'Ivoire","Croatia"
Data "Cuba","Cyprus","Czech Republic","Denmark","Djibouti
","Dominica","Dominican Republic","Ecuador","Egypt","El
Salvador","Equatorial Guinea"
Data
"Eritrea","Estonia","Ethiopia","Fiji","Finland","France","Gabon","Gambia,=
The","Georgia","Germany","Ghana"
Data
"Greece","Grenada","Guatemala","Guinea","Guinea-Bissau","Guyana","Haiti",=
"Honduras","Hungary","Iceland","India"
Data
"Indonesia","Iran","Iraq","Ireland","Israel","Italy","Jamaica","Japan","J=
ordan","Kazakhstan","Kenya"
Data "Kiribati","Korea, North","Korea,
South","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia=
","Libya"
Data "Liechtenstein","Lithuania","Luxembourg","Macedonia, The Former
Yugoslav Republic
of","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall
Islands"
Data "Mauritania","Mauritius","Mexico","Micronesia, Federated States
of","Moldova","Monaco","Mongolia","Morocco","Mozambique","Namibia","Nauru=
"
Data "Nepal","Netherlands","New
Zealand","Nicaragua","Niger","Nigeria","Norway","Oman","Pakistan","Palau"=
,"Panama"
Data "Papua New
Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Qatar","Roma=
nia","Russia","Rwanda","Saint
Kitts and Nevis"
Data "Saint Lucia","Saint Vincent and the Grenadines","Samoa","San
Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia and
Montenegro","Seychelles","Sierra Leone","Singapore"
Data "Slovakia","Slovenia","Solomon Islands","Somalia","South
Africa","Spain","Sri Lanka","Sudan","Suriname","Swaziland","Sweden"
Data
"Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Togo",=
"Tonga","Trinidad
and Tobago","Tunisia","Turkey"
Data "Turkmenistan","Tuvalu","Uganda","Ukraine","United Arab
Emirates","United Kingdom","United States","Uruguay","Uzbekistan","Vatica=
n
City","Vanuatu"
Data "Venezuela","Vietnam","Yemen","Zambia","Zimbabwe",""
=
Restore CT
L=3D0
Repeat =
Read LV$(L) : Inc L
Until LV$(L-1)=3D""
End Proc
-- =
Email: Andy Kellett <mushypd@redrose.net> Team *AMOS* + IAPA Team *AMIG=
A*
*alt.religion.amos* - AMOS now on usenet! AMOS Mailinglist also mirrore=
d
* Proud Member of the AMOSPro V3 Development Team & Official AMOS Library=
*
World's Largest AMOS Homepages - http://www.mushy-pd.demon.co.uk
Also official US distributor of F1 Software. Quality Amiga titles at
quality prices. See homepage for links.
--BOUNDARY.3550672.1
Content-Type: application/octet-stream; name="Mailform.WIN"
Content-Disposition: attachment; filename="Mailform.WIN"
Content-Transfer-Encoding: base64
Rk9STQAABoJHWFdEV0REQQAAAVxJbmZvAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
UmVnaXN0ZXIgWW91ciBWZXJzaW9uIEZSRUUhAAAAAAAAAAAAAAAAAAAAA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